Package uk.co.sculptor.kflibjava
Enum Class SHS.HashAlgorithm
- All Implemented Interfaces:
Serializable
,Comparable<SHS.HashAlgorithm>
,Constable
- Enclosing class:
SHS
Possible Hash Algorithms
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionHash Algorithm definition SHA0 (20 bytes - 160 bits) (Not supported in Java)Hash Algorithm definition SHA0 + convert to 15 ASCII values (Not supported in Java)Hash Algorithm definition SHA1 (20 bytes - 160 bits)Hash Algorithm definition SHA2 -> SH224 (28 bytes - 224 bits)Hash Algorithm definition SHA2 -> SH256 (32 bytes - 256 bits)Hash Algorithm definition SHA2 -> SH384 (48 bytes - 384 bits)Hash Algorithm definition SHA2 -> SH512 (64 bytes - 512 bits) -
Method Summary
Modifier and TypeMethodDescriptionstatic SHS.HashAlgorithm
getFromInt
(int hashAlgorithm) Convert a received value to a HashAlgorithm enumeratorint
getInt()
Convert the HashAlgorithm as the int value used on KfServerstatic SHS.HashAlgorithm
min
(SHS.HashAlgorithm algA, SHS.HashAlgorithm algB) Method that returns the "minimum" algorithm.static SHS.HashAlgorithm
Returns the enum constant of this class with the specified name.static SHS.HashAlgorithm[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
SHA0_SC
Hash Algorithm definition SHA0 + convert to 15 ASCII values (Not supported in Java) -
SHA0
Hash Algorithm definition SHA0 (20 bytes - 160 bits) (Not supported in Java) -
SHA1
Hash Algorithm definition SHA1 (20 bytes - 160 bits) -
SHA224
Hash Algorithm definition SHA2 -> SH224 (28 bytes - 224 bits) -
SHA256
Hash Algorithm definition SHA2 -> SH256 (32 bytes - 256 bits) -
SHA384
Hash Algorithm definition SHA2 -> SH384 (48 bytes - 384 bits) -
SHA512
Hash Algorithm definition SHA2 -> SH512 (64 bytes - 512 bits)
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
getFromInt
Convert a received value to a HashAlgorithm enumerator- Parameters:
hashAlgorithm
- The Sculptor value to be translated to enumerator- Returns:
- the enumerator value
- Throws:
KfException
- when the hashAlgorithm value is invalid
-
min
Method that returns the "minimum" algorithm.- Parameters:
algA
- Algorithm A to have the minimumalgB
- Algorithm B to have the minimum- Returns:
- The "simpler" algorithm from algA and algB.
-
getInt
public int getInt()Convert the HashAlgorithm as the int value used on KfServer- Returns:
- the int value used on KfServer
-